<?php
/* @var $this DefaultController */
/* @var $model InstallForm */
/* @var $form TbActiveForm */

$this->pageTitle = '安装';
$css = <<<EOT
.install {
	width: 600px;
	margin: auto;
}
.install h1 {
	text-align: center;
}
EOT;
Yii::app()->getClientScript()->registerCss(__CLASS__ . $this->id, $css);
?>
<div class="install">
	<h1>安装</h1>

	<?php $this->widget('bootstrap.widgets.TbAlert'); ?>

	<?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
		'type' => 'horizontal',
		'id' => 'install-form',
		'enableClientValidation' => true,
		'clientOptions' => array(
			'validateOnSubmit' => true,
		),
	)); ?>

	<?php echo $form->textFieldRow($model, 'appName'); ?>
	<?php echo $form->textFieldRow($model, 'dbHost'); ?>
	<?php echo $form->textFieldRow($model, 'dbName'); ?>
	<?php echo $form->textFieldRow($model, 'dbUsername'); ?>
	<?php echo $form->passwordFieldRow($model, 'dbPassword'); ?>
	<?php echo $form->textFieldRow($model, 'dbTablePrefix'); ?>
	<?php echo $form->textFieldRow($model, 'adminUsername'); ?>
	<?php echo $form->passwordFieldRow($model, 'adminPassword'); ?>
	<?php echo $form->textFieldRow($model, 'adminEmail'); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType' => 'submit',
			'type' => 'primary',
			'label' => '确定',
		)); ?>
	</div>

	<?php $this->endWidget(); ?>
</div>
